package pack0711;

import java.io.*;

//演示输入字节字符转换流的使用
public class InputStreamReaderDemo {

    public static void main(String[] args) throws Exception {
        InputStream is = new FileInputStream("a.txt");

        //转换为字符流

        Reader reader=new InputStreamReader(is);

        //循环读取数据
        int b=-1;
        while((b=reader.read())!=-1)
            System.out.print((char)b);
    }
}
